<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
	<head>

		<meta charset="utf-8">
		<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">

		<title>麦味·注册</title>
		<meta name="description" content="">
		<meta name="keywords" content="">
    
    
    <link href="/https://fonts.googleapis.com/css?family=Work+Sans:300,400,700" rel="stylesheet">

		<link rel="stylesheet" href="/assets/css/bootstrap/bootstrap.css">
    <link rel="stylesheet" href="/assets/css/animate.css">
    <link rel="stylesheet" href="/assets/fonts/ionicons/css/ionicons.min.css">
    
    <link rel="stylesheet" href="/assets/css/owl.carousel.min.css">
    
    <link rel="stylesheet" href="/assets/fonts/flaticon/font/flaticon.css">

    <link rel="stylesheet" href="/assets/fonts/fontawesome/css/font-awesome.min.css">

    <link rel="stylesheet" href="/assets/css/select2.css">
    

    <link rel="stylesheet" href="/assets/css/helpers.css">
    <link rel="stylesheet" href="/assets/css/style.css">
	<style>
        a.ex2:hover, a.ex2:active {
            color: #149d5b;
            font-size: 150%;
        }

</style>
	</head>
	<body>
  

    <nav class="navbar navbar-expand-lg navbar-dark probootstrap_navbar" id="probootstrap-navbar">
      <div class="container">
        <a class="navbar-brand" href="/index.html">My Way</a>
        <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#probootstrap-menu" aria-controls="probootstrap-menu" aria-expanded="false" aria-label="Toggle navigation">
          <span><i class="ion-navicon"></i></span>
        </button>
        <div class="collapse navbar-collapse" id="probootstrap-menu">
          <ul class="navbar-nav ml-auto">
              <li class="nav-item"><a class="nav-link" href="/index">首页</a></li>
              <li class="nav-item"><a class="nav-link" onclick="alert('还未登录！')" href="/enter">我的订单</a></li>
              <li class="nav-item"><a class="nav-link" href="/enter">登录</a></li>
              <li class="nav-item active"><a class="nav-link" href="/register">注册</a></li>
          </ul>
        </div>
      </div>
    </nav>
    

    <section class="probootstrap-cover overflow-hidden relative"  style="background-image: url('/assets/images/bg_1.jpg');" data-stellar-background-ratio="0.5" id="section-home">
      <div class="overlay"></div>
      <div class="container">
        <div class="row align-items-center">
          <div class="col-md">
            <h2 class="heading mb-2 display-4 font-light probootstrap-animate text-center">欢迎注册麦味！</h2>
             </br></br></br></br></br>
          </div>
          <div class="col-md probootstrap-animate">
	  
            <form action="/register" class="probootstrap-form" method="post" th:object="${user}" id="reg">
              
			  <div class="form-group">
                <label for="u_id" class="sr-only sr-only-focusable">用户名id</label>
				<input type="text" class="form-control" id="u_id" name="uId" placeholder="建议手机号（不长于11位）" th:filed="*{uId}">
                  <span th:text="  ${msg1} + '!'"></span>
              </div>
			  
			  <div class="form-group">
                <label for="u_name" class="sr-only sr-only-focusable">姓名</label>
				<input type="text" class="form-control" id="u_name" name="uName" placeholder="用户姓名" th:filed="*{uName}">
              </div>
			  
			  <div class="form-group">
                <label for="u_password" class="sr-only sr-only-focusable">密码</label>
				<input type="password" class="form-control" id="u_password" name="uPassword" placeholder="请输入密码" th:filed="*{uPassword}">
              </div>
			  
			  <div class="form-group">
                <label for="u_password" class="sr-only sr-only-focusable">请再次输入密码</label>
				<input type="password" class="form-control" id="u_password1"  placeholder="请确认密码" onkeyup="firstCheck()" >
                  <span id="check"></span>
              </div>
		                 
			<div class="row mb-3">
                  <div class="col-md">


                    <div class="form-group">
					<label >已有账号？请 <a class="ex2" href="/enter" color="black">登录</a> 。</label>
					<input type="submit" value="注册" class="btn btn-primary btn-block" onclick="secondCheck()">
            </div>
          </div>
         </div>
                <script>
                    function firstCheck() {
                        var pwd1 = document.getElementById("u_password").value;
                        var pwd2 = document.getElementById("u_password1").value;
                        if(pwd1!=pwd2)
                            document.getElementById("check").innerHTML="<font color='red'>两次密码不相同</font>";
                        else
                        {
                            document.getElementById("check").innerHTML="<font color='green'>两次密码相同</font>";
                        }
                    }
                </script>
                <script>
                    function secondCheck() {
                        var pwd1 = document.getElementById("u_password").value;
                        var pwd2 = document.getElementById("u_password1").value;
                        if(pwd1!=pwd2)
                        {
                            document.getElementById("check").innerHTML="<font color='red'>两次密码不相同</font>";
                        }
                        else
                        {
                            document.getElementById("check").innerHTML="<font color='green'>两次密码相同</font>";
                            var form = document.getElementById('reg');
                            form.submit();
                        }
                    }
                </script>
		  </form>
        </div>
      </div>
      </div>
    	  </br></br></br></br></br></br></br>
	<div class="col-md-12 text-center">
            <p style="color: white" class="probootstrap_font-14">Copyright © 2019 . My Way 麦味 · 酒店订购</p>
    </div>   
    </section>
    <!-- END section -->
    
    <script src="/assets/js/jquery.min.js"></script>
    
    <script src="/assets/js/popper.min.js"></script>
    <script src="/assets/js/bootstrap.min.js"></script>
    <script src="/assets/js/owl.carousel.min.js"></script>
    
    <script src="/assets/js/jquery.waypoints.min.js"></script>
    <script src="/assets/js/jquery.easing.1.3.js"></script>

    <script src="/assets/js/select2.min.js"></script>

    <script src="/assets/js/main.js"></script>
	</body>

<script src="/assets/js/jquery.min.js"></script>

<script src="/assets/js/popper.min.js"></script>
<script src="/assets/js/bootstrap.min.js"></script>
<script src="/assets/js/owl.carousel.min.js"></script>

<script src="/assets/js/jquery.waypoints.min.js"></script>
<script src="/assets/js/jquery.easing.1.3.js"></script>

<script src="/assets/js/select2.min.js"></script>

<script src="/assets/js/main.js"></script>
</body>
</html>